//
//  PageViewController.swift
//  TestPush
//
//  Created by macbook on 2017/6/8.
//  Copyright © 2017年 oceansoft. All rights reserved.
//

import UIKit

class PageViewController: UIPageViewController {

    var mutArray = NSMutableArray.init()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.view.backgroundColor = UIColor.white
        
        self.addChildViewControllers()
        
        let child : ChildTableViewController = mutArray.object(at: 0) as! ChildTableViewController;
        
        self.setViewControllers([child], direction: .forward, animated: true) { (b:Bool) in
            
        }

        // Do any additional setup after loading the view.
    }
    func addChildViewControllers(){
    
        for i in 1...10{
            
            if i<10 {
                let child = ChildTableViewController();
                
                mutArray.addObjects(from: [child])
            }
        }
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
